<?php get_header(); ?>

 <!--Begind recent post-->
<style type="text/css">
#nav { margin: 5px auto }
#nav a { padding: 4px 6px; margin: 3px; border: 1px solid #ccc; text-align: center; text-decoration: none; background-color: #ddd }
#nav a.activeSlide { color: #c00 }
#nav a:focus { outline: none; }
.s6{
 margin: 5px auto; padding: 0;  clear: left; }
.sps { margin: 0; padding: 0; }
.s6,.sps{
height: 180px; width: 740px;

}

.s6,img{
padding: 1px; border: 1px solid #ccc; background-color: #eee;  margin: 0

}

.abc{ width:350px; float:left;
}
.def{ width:340px; float:right;
}
.slideshow { margin: 5px auto; padding: 0;  clear: left; }
.slide { margin: 0; padding: 0; }
.slideshow, .slide { height: 85px; width: 604px; }
.slideshow img { padding: 1px; border: 1px solid #ccc; background-color: #eee;  margin: 0 }

</style>
<!-- include jQuery library -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<!-- include Cycle plugin -->
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'scrollLeft',
		delay: 5000

	});
	$('#s6').cycle({ 
    
	fx:     'scrollLeft', 
    delay:1000,
	prev:'#link-prev',
    next: '#link-next'
   });
   $('#sections').cycle({ 
    
	fx:     'fade', 
    timeout: 6000 ,
	delay:6500
   });
   $('#pauseBtn').toggle(function() {

                $('#s6').cycle('pause');
                $('#mute').attr({ src: "<?php bloginfo('template_directory'); ?>/images/play.jpg"});

                }, function() {

                $('#s6').cycle('resume', true);
               $('#mute').attr({ src: "<?php bloginfo('template_directory'); ?>/images/pause.jpg"});
        });

});
</script>

<?php if (get_option('evid_featured') == 'on') { get_template_part('includes/featured'); } ?>

<div id="wrapper2">

<div id="container">

    <div id="left-div">
	
    <br>
	<div style="width:100%;float:right;text-align:left;"><?php include('http://www.bigvoicesmedia.biz/weather-forecast.php'); ?></div>
    <br/>
	<div style="margin:auto;text-align:center"><div id="nav"></div></div>
		<?php 
		//query_posts('cat=32&showposts=5');
		$my_query1 = new WP_Query("cat=32&showposts=5");
		function plugin_myContentFilter($content)
{
// Take the existing content and return a subset of it
print substr($content, 0, 300);
}

?>

<div id="s6" style="position: relative; overflow: hidden;">


     
    <?php if ($my_query1->have_posts()) : while ($my_query1->have_posts()) : $my_query1->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table><tr><td>
<img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="300" height="180" /></td><td width="10px">&nbsp;</td><td><table>
<tr height="25px;"><td colspan="2" style="text-align:left; top:0px"><a href="<?php the_permalink(); ?>"><?php the_title( '<h3>', '</h3>' ); ?></a></td></tr>
<tr height="150px;" style="min-height:150px;"><td colspan="2" style="text-align:left; top:0px;">   
<?php the_excerpt(); ?>   
</td></tr></table></td></tr></table>

<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?>

			</div>
			<a href="" id="link-prev"><img src="<?php bloginfo('template_directory'); ?>/images/prev.jpg" /></a>
			<a href="" id="pauseBtn"><img src="<?php bloginfo('template_directory'); ?>/images/pause.jpg" id="mute" /></a>
 <a href="" id="link-next"><img src="<?php bloginfo('template_directory'); ?>/images/next.jpg" /></a>
			<div style="height:30px;">&nbsp;</div>
	
<div style="font-size:14px !important; color:#000000; font-weight:bold; background-color:#F0F0F0; text-align:left; border: #CCCCCC 2px solid; padding-left:6px;border-radius:20px;">Check out our featured networks!</div>
		<div style="margin:auto;text-align:center"><div id="nav"></div></div>
		<?php 
		$subcategories = get_categories('&child_of=4&hide_empty');
$cnt1= 0;
?>

<div class="slideshow">

<div class="slide">
<?php
foreach ($subcategories as $subcategory) {

$catlink = get_category_link($subcategory->term_id);
$catname = $subcategory->name;
$caticon = "select * from wp_ig_caticons where cat_id='".$subcategory->term_id."'";
$qun = mysql_query($caticon);
$datacat = $wpdb->get_results($caticon);
$count = mysql_num_rows($qun);
if($count >0){
$cnt1++;
}
if($cnt1==5 || $cnt1==9 || $cnt1==13){ ?>
</div><div class="slide"> 
<?php } 
foreach ($datacat as $dct) {
$catpath = 'http://bigvoicesmedia.biz/'.$dct->icon;	 // Aggi

 ?>
	
		<a href="<?php echo $catlink; ?>" class="network"><img src="<?php echo $catpath; ?>" width="115" height="110" /></a>	
			<?php } }  ?></div></div>
			
			<div style="margin:auto;text-align:center"><div id="nav"></div></div>
		<?php 
		$subcategories = get_categories('&child_of=5&hide_empty');
$cnt1= 0;
?>
<br/>
<div style="font-size:14px !important; color:#000000; font-weight:bold; background-color:#F0F0F0; text-align:left; border: #CCCCCC 2px solid; padding-left:6px;border-radius:20px;">Today's Headlines</div>

            
            
            
			
			
			
	<div style="height:15px;"></div>
        <div style="width:620px;height:400px;padding-left:4px;"><?php include('feeds.php') ?></div>	
        <div style="clear: both;"></div>
         <div style = "height:25px;"></div>
		 <div><table width="620">
  <tr>
    <td>
	<?php
	$my_query2 = new WP_Query("cat=34&showposts=1");
	 if ($my_query2->have_posts()) : while ($my_query2->have_posts()) : $my_query2->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?>

	
	</td>
	<td width="10px">&nbsp;</td>
    <td><?php
	$my_query3 = new WP_Query("cat=33&showposts=1");
	 if ($my_query3->have_posts()) : while ($my_query3->have_posts()) : $my_query3->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?></td>
<td width="10px">&nbsp;</td>
    <td><?php
	$my_query4 = new WP_Query("cat=36&showposts=1");
	 if ($my_query4->have_posts()) : while ($my_query4->have_posts()) : $my_query4->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
	<?php
	$my_query5 = new WP_Query("cat=35&showposts=1");
	 if ($my_query5->have_posts()) : while ($my_query5->have_posts()) : $my_query5->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?>

	
	</td>
	<td width="10px">&nbsp;</td>
    <td><?php
	$my_query6 = new WP_Query("cat=38&showposts=1");
	 if ($my_query6->have_posts()) : while ($my_query6->have_posts()) : $my_query6->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?></td>
<td width="10px">&nbsp;</td>
    <td><?php
	$my_query7 = new WP_Query("cat=37&showposts=1");
	 if ($my_query7->have_posts()) : while ($my_query7->have_posts()) : $my_query7->the_post();
	$classtext = '';
					  $titletext = get_the_title();

					  $thumbnail = get_thumbnail($width, $height,$classtext,$titletext,$titletext,false);
					  $thumb = $thumbnail["thumb"];
	 ?>
	<table width="200px">
  <tr>
    <td><img src="<?php if($thumbnail["thumb"]!=''){ print $thumbnail["thumb"]; } else { print 'http://bigvoicesmedia.biz/wp-content/uploads/2012/12/big-voices-logo2.jpg'; } ?>" width="180" height="110" /></td>
  </tr>
  <tr>
    <td><a href="<?php the_permalink(); ?>"><?php the_title( '<h5>', '</h5>' ); ?></a></td>
  </tr>
  <tr>
    <td><?php the_content('Read More'); ?></td>
  </tr>
</table>
<?php endwhile; wp_reset_postdata(); ?><?php else : ?><h2>Not Found</h2><?php endif; ?></td>
  </tr>
</table>
</div>
        <?php //if (get_option('evid_catbox') == 'on') { get_template_part('includes/catbox'); } ?>
        <div style="clear: both;"></div>
        <?php //if (get_option('evid_randompopular') == 'on') { get_template_part('includes/popular'); } ?>
  
    
    
    
    
    </div>
    <?php get_sidebar(); ?>
    <br>
<br>
<?php get_footer(); ?>
</body>
</html>